class MutNewDifficulty extends Mutator;

var()	globalconfig int	GameMod; 

simulated function PostBeginPlay()
{
	if ( MassacreGame(Level.Game) == none )
	{
//		if( GameMod == 0 )
			Level.ServerTravel("?game=MassacreMut.MassacreGame", true);
//		else
//			Level.ServerTravel("?game=MassacreMut.MassacreGameSurvival", true);
			
/*
		if ( (GetCurrentMap() ~= "kf-Arcade-Gas-Station_FIN") || (GetCurrentMap() ~= "kf-Concert Hall_D") || (GetCurrentMap() ~= "kf-Arcade_Action-D")
			|| (GetCurrentMap() ~= "kf-WaterCanal") || (GetCurrentMap() ~= "kf-Bridge-RSIX") || (GetCurrentMap() ~= "kf-Temple_of_the_God_Ga7")
			|| (GetCurrentMap() ~= "kf-Big_Room_Ga") || (GetCurrentMap() ~= "kf-Deck16_New_Fix") || (GetCurrentMap() ~= "kf-Japanese_Garden")
			|| (GetCurrentMap() ~= "kf-[BZ]Stalker-Stream") || (GetCurrentMap() ~= "kf-Mansion[CS_1_6]") )
		{
			MassacreGame(Level.Game).DemoFireDamageModifier = 0.70;
		}
		else if ( (GetCurrentMap() ~= "kf-Sector-V") || (GetCurrentMap() ~= "kf-defence_D") || (GetCurrentMap() ~= "kf-Arcade-Syndicate-Beta_JI")
				|| (GetCurrentMap() ~= "kf-OperationLightsOn(FINAL)-Remix_By_Dest") || (GetCurrentMap() ~= "kf-Toilet_DR5")
				|| (GetCurrentMap() ~= "kf-Doom2-Remix") || (GetCurrentMap() ~= "kf-Doom2_DR2") )
		{
			MassacreGame(Level.Game).DemoFireDamageModifier = 0.50;
		}
		else if ( (GetCurrentMap() ~= "kf-Tunnel-D1") || (GetCurrentMap() ~= "kf-Baroque") )
		{
			MassacreGame(Level.Game).DemoFireDamageModifier = 0.30;
		}
*/
		return;
	}
	Log("New Difficulty ENABLED");
		
}

function Destroyed()
{
//	if (MassacreGame(Level.Game) != none || MassacreGameSurvival(Level.Game) != none)
//		Level.ServerTravel("?game=KFMod.KFGameType", true);
}

simulated function string GetCurrentMap()
{
	local string MapName;
	local int a, b;
	
	MapName = Level.GetLocalURL();

	a = InStr(MapName, "/");
	if (a < 0) a = 0;
	else a++;

	b = InStr(MapName, "?");
	if (b < 0 ) b = Len(MapName);

	return Mid(MapName, a, b - a);
}

defaultproperties
{
	 GameMod=0
//   bAddToServerPackages=false
     GroupName="KF-NewDifficulty"
     FriendlyName="New Difficulty"
     Description="Adds new difficulty level."
//   bAlwaysRelevant=True
//   RemoteRole=ROLE_SimulatedProxy
}
